<?php
class Application_Model_DbTable_Attribution extends Zend_Db_Table_Abstract{
	protected $_name = 'attribution';
	public function fetchAllByAuthor($author){
		$select = $this->select();
		$select->setIntegrityCheck(false);
		
		$select	->from(array('a'=>$this->_name))
				->joinLeft(array('q'=>'qcm'), 'a.id_qcm=q.id', array('titre'))
				->joinLeft(array('s'=>'section'), 'a.id_section=s.id',array('abrev'))
				->where('a.id_personne = ?',$author);
		return $select->query()->fetchAll(PDO::FETCH_OBJ);
	}
}